return function()
  local notify = require('notify')
  notify.setup({
    background_colour = 'Normal',
    on_open = nil,
    on_close = nil,
    fps = 30,
    icons = {
      DEBUG = '',
      ERROR = '',
      INFO = '',
      TRACE = '',
      WARN = '',
    },
    level = 2,
    max_height = function()
      return math.floor(vim.o.lines * 0.25)
    end,
    max_width = function()
      return math.floor(vim.o.columns * 0.25)
    end,
    render = 'default',
    stages = 'fade',
    timeout = 1000,
    top_down = true,
  })
  vim.notify = notify
  -- table from lsp severity to vim severity.
  local severity = {
    'error',
    'warn',
    'info',
  }
  vim.lsp.handlers['window/showMessage'] = function(err, method, params, client_id)
    vim.notify(method.message, severity[params.type])
  end
end
